<?php
/**
 * Created by PhpStorm.
 * User: lyon
 * Date: 16-12-6
 * Time: 下午12:38
 */
include_once 'function/Config.php';
include_once 'function/Curler.php';
include_once 'function/Mysql.php';
include_once 'function/Preg.php';
include_once 'function/Log.php';
include_once 'function/SaveUserInfo.php';
include_once 'function/ReadUserInfo.php';
include_once 'function/Count.php';

Log::_init();
Mysql::_init();
Count::_init();

$field = '';
$table = $GLOBALS['db']['name'];

$exit = 1;
while($exit)
{
    $arr = array('issearch' => '0');
    if (empty($searchName = Mysql::findOne($arr,$field, $table)))
    {
        exit;
    }
    else
    {
        Mysql::upDateOne(array('issearch' => '1'), array('id' => "{$searchName['id']}"), $table);
        Preg::searchUser($searchName['u_name']);
    }
    Count::getTime();
    Count::show();
}